package com.sumainfor.wx.tenant.controller.housekeeper;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.wx.tenant.service.HoTenantCouponsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.Map;

/**
 *智能设备充值记录
 */
@RestController
@RequestMapping("/housekeeper/TenantCoupons")
public class HoTenantCouponsController implements Serializable {
    @Autowired
    private HoTenantCouponsService hoTenantCouponsService;
    /**
     * 查询租客的优惠卷列表
     */
    @GetMapping("/getHotcList")
    public JsonResult getHotcList(@RequestParam Map<String,Object> params){
        return hoTenantCouponsService.getHotcList(params);
    }
    /**
     * 修改优惠卷为已使用
     */
    @PostMapping("/key/updateHotc")
    public JsonResult updateHotc(@RequestBody Map<String,Object> params){
        return hoTenantCouponsService.updateHotc(params);
    }
    /**
     * 查询租客的优惠卷列表
     */
    @PostMapping("/getHotcListBybiTypeList")
    public JsonResult getHotcListBybiTypeList(@RequestBody Map<String,Object> params){
        return hoTenantCouponsService.getHotcListBybiTypeList(params);
    }
}
